home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume18 / elm2.2 / part01 next >
Encoding:
Internet Message Format  |  1989-04-12  |  49.4 KB

  1. Subject:  v18i080:  Elm mail system, release 2.2, Part01/24
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: dsinc!syd@uunet.UU.NET (Syd Weinstein)
  7. Posting-number: Volume 18, Issue 80
  8. Archive-name: elm2.2/part01
  9.  
  10. [  This is from the file "Overview..."  --r$  ]
  11.  
  12.     Currently on Unix, there seems to be a preponderence of line-oriented 
  13. software.  This is most unfortunate as most of the software on Unix tends to
  14. be pretty darn hard to use!  I believe that there is more than a slight
  15. correlation between the two, and, since I was myself having problems using
  16. "mailx" with high-volume mail, I created a new mail system.
  17.  
  18.     In the lingo of the mail guru, Elm is a "User Agent" system,  it's
  19. designed to run with "sendmail" or "/bin/rmail" (according to what's on
  20. your system) and is a full replacement of programs like "/bin/mail" and
  21. "mailx".  The system is more than just a single program, however, and
  22. includes programs like "frm" to list a 'table of contents' of your
  23. mail, "printmail" to quickly paginate mail files (to allow 'clean'
  24. printouts), and "autoreply", a systemwide daemon that can autoanswer
  25. mail for people while they're on vacation without having multiple
  26. copies spawned on the system.
  27.  
  28.  
  29.  
  30. ---- Cut Here and unpack ----
  31. #!/bin/sh
  32. # shar:    Shell Archiver  (v1.22)
  33. #
  34. # This is part 1 of a multipart archive                                    
  35. # do not concatenate these parts, unpack them in order with /bin/sh        
  36. #
  37. #    Run the following text with /bin/sh to create:
  38. #      README
  39. #      Overview
  40. #      NOTICE
  41. #      MANIFEST
  42. #      Instruct
  43. #      Changes
  44. #      Configure
  45. #      config.h.SH
  46. #      Makefile.SH
  47. #      doc/Alias.guide
  48. #      doc/Config.guid
  49. #      doc/Elm.cover
  50. #      doc/Filter.guid
  51. #      doc/Form.guide
  52. #      doc/Makefile.SH
  53. #      doc/Ref.guide
  54. #      doc/Users.guide
  55. #      doc/answer.1
  56. #      doc/autoreply.1
  57. #      doc/chkalias.1
  58. #      doc/elm-help.0
  59. #      doc/elm-help.1
  60. #      doc/elm-help.2
  61. #      doc/elm-help.3
  62. #      doc/elm.1
  63. #      doc/elmrc-info
  64. #      doc/elmrc.samp
  65. #      doc/fastmail.1
  66. #      doc/filter.1
  67. #      doc/frm.1
  68. #      doc/listalias.1
  69. #      doc/messages.1
  70. #      doc/newalias.1
  71. #      doc/newmail.1
  72. #      doc/printmail.1
  73. #      doc/readmsg.1
  74. #      doc/tmac.n
  75. #      doc/wnewmail.1
  76. #      filter/Makefile.SH
  77. #      filter/actions.c
  78. #      filter/buffer.c
  79. #      filter/filter.c
  80. #      filter/lock.c
  81. #      filter/parse.c
  82. #      filter/rules.c
  83. #      filter/summarize.c
  84. #      filter/utils.c
  85. #      hdrs/curses.h
  86. #      hdrs/defs.h
  87. #      hdrs/elm.h
  88. #      hdrs/filter.h
  89. #      hdrs/headers.h
  90. #      hdrs/patchlevel.h
  91. #      hdrs/save_opts.h
  92. #      hdrs/shortname.1
  93. #      hdrs/shortname.2
  94. #      hdrs/shortname.h
  95. #      hdrs/sysdefs.SH
  96. #      src/Makefile.SH
  97. #      src/addr_util.c
  98. #      src/alias.c
  99. #      src/aliasdb.c
  100. #      src/aliaslib.c
  101. #      src/args.c
  102. #      src/bouncebk.c
  103. #      src/builtin.c
  104. #      src/calendar.c
  105. #      src/conn_to.c
  106. #      src/curses.c
  107. #      src/date.c
  108. #      src/delete.c
  109. #      src/domains.c
  110. #      src/edit.c
  111. #      src/editmsg.c
  112. #      src/elm.c
  113. #      src/encode.c
  114. #      src/errno.c
  115. #      src/expires.c
  116. #      src/file.c
  117. #      src/file_util.c
  118. #      src/fileio.c
  119. #      src/forms.c
  120. #      src/hdrconfg.c
  121. #      src/help.c
  122. #      src/in_utils.c
  123. #      src/init.c
  124. #      src/leavembox.c
  125. #      src/limit.c
  126. #      src/mailmsg1.c
  127. #      src/mailmsg2.c
  128. #      src/mailtime.c
  129. #      src/mkhdrs.c
  130. #      src/newmbox.c
  131. #      src/opt_utils.c
  132. #      src/options.c
  133. #      src/out_utils.c
  134. #      src/pattern.c
  135. #      src/pmalloc.c
  136. #      src/quit.c
  137. #      src/read_rc.c
  138. #      src/remail.c
  139. #      src/reply.c
  140. #      src/returnadd.c
  141. #      src/save_opts.c
  142. #      src/savecopy.c
  143. #      src/screen.c
  144. #      src/showmsg.c
  145. #      src/showmsg_c.c
  146. #      src/signals.c
  147. #      src/softkeys.c
  148. #      src/sort.c
  149. #      src/string2.c
  150. #      src/strings.c
  151. #      src/syscall.c
  152. #      src/utils.c
  153. #      src/validname.c
  154. #      test/test.empty
  155. #      test/test.mail
  156. #      utils/Makefile.SH
  157. #      utils/answer.c
  158. #      utils/arepdaem.c
  159. #      utils/autoreply.c
  160. #      utils/checkalias
  161. #      utils/expand.c
  162. #      utils/fastmail.c
  163. #      utils/from.c
  164. #      utils/listalias.c
  165. #      utils/mailrc.awk
  166. #      utils/messages
  167. #      utils/newalias.c
  168. #      utils/newmail.c
  169. #      utils/printmail
  170. #      utils/readmsg.c
  171. #
  172. if test -r s2_seq_.tmp
  173. then echo "Must unpack archives in sequence!"
  174.      next=`cat s2_seq_.tmp`; echo "Please unpack part $next next"
  175.      exit 1; fi
  176. echo "Making directories"
  177. mkdir doc filter hdrs src test utils
  178. echo "x - extracting README (Text)"
  179. sed 's/^X//' << 'SHAR_EOF' > README &&
  180. XThis is the 2.2 release version of Dave Taylor's Elm mail system.
  181. X
  182. XElm 2.2 release is the 2.2 Version being prepared for release.
  183. X
  184. XSee the NOTICE and Instruct files for further details.
  185. X
  186. XLimitations/Problems you might encounter in installing Elm:
  187. X
  188. XThe Configuration script has been known to exceed the default stack
  189. Xsize in Unix 286 sh's.  If Configure does not run correctly on this
  190. Xtype of machine increase the stack size and rerun it.
  191. XOn Microport SysV/AT machines, Configure will run correctly under
  192. Xksh.  Obtain ksh from Microport (available to current version owners
  193. Xwithout additional charge) and rerun Configure using it.
  194. X
  195. XAlso on Microport SysV/AT Machines, the C compiler produces improper code
  196. Xfor one of the arithmetic calls.  To fix this problem it is necessary to
  197. Xreduce the complexity of the statement, as reported by one of our testers
  198. Xhere is the symptom and his patch.  Being this is a compiler bug on only
  199. Xone system, we make the information available, but not incorporate it in
  200. Xthe main release.  Note, this may effect other areas of Elm, and in the
  201. Xfuture, Microport may even fix this problem.
  202. X> I finally tracked down the bug that was causing the lengthy delays when
  203. X> the first message was displayed.  The Microport 80286 C compiler was
  204. X> generating bad code for the computation of padding in showmsg.c.  The
  205. X> compiler generated scratch variables in the expression were being
  206. X> located at weird offsets in the stack segment.  This caused the program
  207. X> to stall while the kernel attempted to grow the stack segment to a size
  208. X> that was large enough to contain the scratch variables.  This explains
  209. X> why it only happened the first time a message was displayed.  Here is a
  210. X> patch that fixes the problem:
  211. X> 
  212. X> *** showmsg.c.dist    Fri Mar 17 21:08:37 1989
  213. X> --- showmsg.c    Sat Mar 18 06:14:04 1989
  214. X> ***************
  215. X> *** 280,289
  216. X>                  atoi(current_header->year), current_header->time);
  217. X>   
  218. X>         /* truncate or pad title2 portion on the right
  219. X> !        * so that line fits exactly */
  220. X> !       padding =
  221. X> !         COLUMNS -
  222. X> !         (strlen(title1) + (buf_len=strlen(title2)) + strlen(title3));
  223. X>   
  224. X>         sprintf(titlebuf, "%s%-*.*s%s\n", title1, buf_len+padding,
  225. X>             buf_len+padding, title2, title3);
  226. X> 
  227. X> --- 280,292 -----
  228. X>                  atoi(current_header->year), current_header->time);
  229. X>   
  230. X>         /* truncate or pad title2 portion on the right
  231. X> !        * so that line fits exactly, expression has been
  232. X> !        * simplified to avoid bug in Microport 80286
  233. X> !        * C compiler */
  234. X> !       padding = COLUMNS;
  235. X> !       padding -= strlen(title1);
  236. X> !       padding -= (buf_len = strlen(title2));
  237. X> !       padding -= strlen(title3);
  238. X>   
  239. X>         sprintf(titlebuf, "%s%-*.*s%s\n", title1, buf_len+padding,
  240. X>             buf_len+padding, title2, title3);
  241. X> 
  242. X> -- 
  243. X> John A. Limpert
  244. X> UUCP:    johnl@n3dmc.UUCP, johnl@n3dmc.UU.NET, uunet!n3dmc!johnl
  245. X
  246. X
  247. XIf you run a nonstandard configuration of Mail, such as Xenix running smail,
  248. XConfigure can get confused as to where to place items.  Be sure and check the
  249. Xconfig.sh file for the correct placement before continuning.  If changes
  250. Xare necessary, rerun Configure and fix the file before exiting.
  251. X
  252. XOn some systems, especially those based on the AT&T Port to 286's
  253. Xthe -O flag of the compiler produces improper code causing segmentation
  254. Xviolations.  If this happens, recompile the code without the -O flag.
  255. XThis has been seen with Microport SysV/AT type systems.
  256. X
  257. X                    Syd Weinstein
  258. X                    Elm Coordinator
  259. X                    elm@dsinc.UUCP
  260. X                    (dsinc!elm)
  261. SHAR_EOF
  262. chmod 0444 README || echo "restore of README fails"
  263. echo "x - extracting Overview (Text)"
  264. sed 's/^X//' << 'SHAR_EOF' > Overview &&
  265. X            An Overview of the Elm Mail System
  266. X            ----------------------------------
  267. X
  268. XIntroduction
  269. X
  270. X    This file discusses the functionality of the Elm mail system
  271. Xand explains some of the motivation behind the various features.
  272. X
  273. X1. What is Elm?
  274. X
  275. X    Currently on Unix, there seems to be a preponderence of line-oriented 
  276. Xsoftware.  This is most unfortunate as most of the software on Unix tends to
  277. Xbe pretty darn hard to use!  I believe that there is more than a slight
  278. Xcorrelation between the two, and, since I was myself having problems using
  279. X"mailx" with high-volume mail, I created a new mail system.
  280. X
  281. X    In the lingo of the mail guru, Elm is a "User Agent" system,  it's
  282. Xdesigned to run with "sendmail" or "/bin/rmail" (according to what's on
  283. Xyour system) and is a full replacement of programs like "/bin/mail" and
  284. X"mailx".  The system is more than just a single program, however, and
  285. Xincludes programs like "frm" to list a 'table of contents' of your
  286. Xmail, "printmail" to quickly paginate mail files (to allow 'clean'
  287. Xprintouts), and "autoreply", a systemwide daemon that can autoanswer
  288. Xmail for people while they're on vacation without having multiple
  289. Xcopies spawned on the system.
  290. X
  291. X2. What's New about Elm?
  292. X
  293. X    The most significant difference between Elm and earlier mail
  294. Xsystems is that Elm is screen-oriented.  Upon further use, however,
  295. Xusers will find that Elm is also quite a bit easier to use, and quite
  296. Xa bit more "intelligent" about sending mail and so on.   For example,
  297. Xsay you're on "usenet" and receive a message from someone on the
  298. XARPANET.  The sender also "cc'd" another person on ARPA.  With Elm
  299. Xyou can simply G)roup reply and it will build the correct return
  300. Xaddresses.
  301. X
  302. X    There are lots of subtleties like that in the program, most of
  303. Xwhich you'll probably find when you need them.
  304. X
  305. X3. What systems does it work on?
  306. X
  307. X    Elm was originally written on HP-UX, HP's proprietary version
  308. Xof Bell system V, with a little BSD thrown in.  Since then, it has been
  309. Xported to Bell, Berkeley, Sun, UTS, Pyramid and Xenix and should run on 
  310. Xall these systems without any modifications (if there turn out to be 
  311. Xmodifications, please notify the author as soon as possible).
  312. X
  313. X4. Does it obey existing mail standards?
  314. X
  315. X    Yes!  That's another of the basic reasons the program was 
  316. Xoriginally written!  To ensure that the date field, the "From:" line
  317. Xand so on were all added in the correct format.  The program is 100%
  318. Xcorrect according to the RFC-822 electronic mail header protocol
  319. Xguide.
  320. X
  321. X5. What were the main motivating factors?
  322. X
  323. X    The first two I've already mentioned, but here's a (somewhat
  324. Xpartial) list;
  325. X
  326. X    -  To have a mail system that exploited the CRT instead of
  327. X       assuming I'm on a teletype.
  328. X
  329. X    - To have a mailer that was 100% correct when dealing with     
  330. X      network mail (ie RFC-822).
  331. X
  332. X    - To create a system that needed no documentation for the
  333. X      casual user, but was still powerful enough and sophisticated
  334. X      enough for a mail expert.
  335. X
  336. X    - To write a "significant" piece of software as a learning
  337. X      experience (I admit it!)
  338. X
  339. X    - To find out how reasonable it is to try to modify a program
  340. X      to meet the expectations of the users, rather than vice-versa.
  341. X
  342. X    - To basically correct some of the dumb things that the current
  343. X      mailers do, like letting you send mail to addresses that it
  344. X      could trivially figure out are going to result in 'dead.letter'
  345. X
  346. X    - To tie in intimately with the pathalias program output, and
  347. X      allow users to specify machine!user or user@machine and have
  348. X      the COMPUTER do the work of figuring out addresses...
  349. X
  350. X6. Is it reliable?
  351. X
  352. X    The mailer, in various incarnations, has logged literally
  353. Xthousands upon thousands of hours without any problems that aren't
  354. Xnow corrected.  As new problems arise they're dealt with in as
  355. Xrapid a manner as possible...
  356. X
  357. X7. Disclaimers 
  358. X
  359. X    The author of this program will deny all liability for any
  360. Xdamages, either real or imagined, due to the execution of this program
  361. Xor anything related to either the software or the system.  Furthermore,
  362. Xthe entire system and all source within, including the presentation
  363. Xscreens and commands, are legally copyrighted by the author, and while
  364. Xthey can be used, and abused, for public domain systems, it will be in 
  365. Xviolation of the law if used in systems or programs sold for profit.
  366. X
  367. X    By installing the mailer or even extracting it from the network,
  368. Xyou are agreeing to the above disclaimer.
  369. X
  370. X8. Finally
  371. X
  372. X    I think it's a good program, and I can cite at least 75 people
  373. Xwho would (begrudgingly, I'm sure) agree.  You should most certainly
  374. Xinstall the program and try it!!
  375. X
  376. X
  377. X                -- Dave Taylor
  378. X                
  379. X                taylor@hplabs.HP.COM
  380. X
  381. XMarch 13th, 1986
  382. SHAR_EOF
  383. chmod 0444 Overview || echo "restore of Overview fails"
  384. echo "x - extracting NOTICE (Text)"
  385. sed 's/^X//' << 'SHAR_EOF' > NOTICE &&
  386. X
  387. X                The Elm(tm) Mail System General Public License
  388. X           
  389. X
  390. X            (C) Copyright 1986, 1987, by Dave Taylor
  391. X                    (C) Copyright 1988, 1989, USENET Community Trust
  392. X
  393. X
  394. X                  COPYING POLICIES
  395. X
  396. X     Permission is hereby granted for copying and distribution of copies of
  397. X  the Elm source files, and that of any part thereof, subject to the following 
  398. X  license conditions:
  399. X
  400. X        1. You may, without additional permission from the authors, distribute 
  401. X           Elm or components of Elm, with or without additions developed by 
  402. X           you or by others at no charge.  You may also distribute Elm along 
  403. X           with any other product for sale, provided that the cost of the 
  404. X           bundled package is the same regardless of whether Elm is included,
  405. X           and provided that those interested only in Elm must be notified 
  406. X           that it is a product freely available from the Elm Development Group.
  407. X
  408. X        2. Furthermore, if you distribute Elm software or parts of Elm, with 
  409. X           or without additions developed by you or others, then you must 
  410. X           either make available the source to all portions of the Elm system 
  411. X           (exclusive of any additions made by you or by others) upon request, 
  412. X           or instead you may notify anyone requesting source that it is 
  413. X           freely available from the Elm Development Group.
  414. X
  415. X        3. In addition, you may not omit any of the copyright notices
  416. X           on either the source files, the executable file, or the 
  417. X           documentation, and
  418. X
  419. X        4. Also, you may not omit transmission of this License agreement with 
  420. X           whatever portions of Elm that are distributed.
  421. X
  422. X        5. Lastly, any users of this software must be notified that it is
  423. X           without warrantee or guarantee of any nature, express or implied, 
  424. X           nor is there any fitness for use represented.
  425. X
  426. XSoftware is a malleable thing - especially Unix - and the authors can in no
  427. Xway guarantee that using this program will not cause grevious damage to your
  428. Xsystem.  Of course this isn't anticipated, but if it does happen, the authors
  429. Xcannot be held liable for any damages either directly or indirectly caused
  430. Xby this event.
  431. X
  432. XModification of the system is encouraged, providing that the portions of 
  433. Xthe system that are from the original still carry the appropriate copyright
  434. Xnotices and that the changed sections are clearly delimited as such.  The
  435. Xauthors requests copies of any changes made to ensure that the various versions
  436. Xstay reasonably in sync with each other.  Please send all revisions to
  437. Xelm@dsinc.UUCP.
  438. X
  439. XNOTE that it is not permitted to copy, sublicense, distribute or transfer any
  440. Xof the Elm software except as expressly indicated herein.  Any attempts to
  441. Xdo otherwise will be considered a violation of this license and your rights
  442. Xto the Elm software will be voided.
  443. X
  444. X
  445. XComments on the system and/or this licensing agreement is encouraged.  Send
  446. Xelectronic mail to "taylor@hplabs.HP.COM".  This license was written with
  447. Xhelp from Scott McGregor.  Thanks Scott!
  448. X
  449. X----
  450. XElm is a trademark of Dave Taylor. 
  451. X
  452. XNOTE: Elm is now in the public trust. Comments, suggestions, bug reports and the
  453. Xlike should be sent to Syd Weinstein; elm@dsinc.UUCP (dsinc!elm)
  454. SHAR_EOF
  455. chmod 0444 NOTICE || echo "restore of NOTICE fails"
  456. echo "x - extracting MANIFEST (Text)"
  457. sed 's/^X//' << 'SHAR_EOF' > MANIFEST &&
  458. XREADME
  459. XOverview
  460. XNOTICE
  461. XMANIFEST
  462. XInstruct
  463. XChanges
  464. XConfigure
  465. Xconfig.h.SH
  466. XMakefile.SH
  467. Xdoc/Alias.guide
  468. Xdoc/Config.guid
  469. Xdoc/Elm.cover
  470. Xdoc/Filter.guid
  471. Xdoc/Form.guide
  472. Xdoc/Makefile.SH
  473. Xdoc/Ref.guide
  474. Xdoc/Users.guide
  475. Xdoc/answer.1
  476. Xdoc/autoreply.1
  477. Xdoc/chkalias.1
  478. Xdoc/elm-help.0
  479. Xdoc/elm-help.1
  480. Xdoc/elm-help.2
  481. Xdoc/elm-help.3
  482. Xdoc/elm.1
  483. Xdoc/elmrc-info
  484. Xdoc/elmrc.samp
  485. Xdoc/fastmail.1
  486. Xdoc/filter.1
  487. Xdoc/frm.1
  488. Xdoc/listalias.1
  489. Xdoc/messages.1
  490. Xdoc/newalias.1
  491. Xdoc/newmail.1
  492. Xdoc/printmail.1
  493. Xdoc/readmsg.1
  494. Xdoc/tmac.n
  495. Xdoc/wnewmail.1
  496. Xfilter/Makefile.SH
  497. Xfilter/actions.c
  498. Xfilter/buffer.c
  499. Xfilter/filter.c
  500. Xfilter/lock.c
  501. Xfilter/parse.c
  502. Xfilter/rules.c
  503. Xfilter/summarize.c
  504. Xfilter/utils.c
  505. Xhdrs/curses.h
  506. Xhdrs/defs.h
  507. Xhdrs/elm.h
  508. Xhdrs/filter.h
  509. Xhdrs/headers.h
  510. Xhdrs/patchlevel.h
  511. Xhdrs/save_opts.h
  512. Xhdrs/shortname.1
  513. Xhdrs/shortname.2
  514. Xhdrs/shortname.h
  515. Xhdrs/sysdefs.SH
  516. Xsrc/Makefile.SH
  517. Xsrc/addr_util.c
  518. Xsrc/alias.c
  519. Xsrc/aliasdb.c
  520. Xsrc/aliaslib.c
  521. Xsrc/args.c
  522. Xsrc/bouncebk.c
  523. Xsrc/builtin.c
  524. Xsrc/calendar.c
  525. Xsrc/conn_to.c
  526. Xsrc/curses.c
  527. Xsrc/date.c
  528. Xsrc/delete.c
  529. Xsrc/domains.c
  530. Xsrc/edit.c
  531. Xsrc/editmsg.c
  532. Xsrc/elm.c
  533. Xsrc/encode.c
  534. Xsrc/errno.c
  535. Xsrc/expires.c
  536. Xsrc/file.c
  537. Xsrc/file_util.c
  538. Xsrc/fileio.c
  539. Xsrc/forms.c
  540. Xsrc/hdrconfg.c
  541. Xsrc/help.c
  542. Xsrc/in_utils.c
  543. Xsrc/init.c
  544. Xsrc/leavembox.c
  545. Xsrc/limit.c
  546. Xsrc/mailmsg1.c
  547. Xsrc/mailmsg2.c
  548. Xsrc/mailtime.c
  549. Xsrc/mkhdrs.c
  550. Xsrc/newmbox.c
  551. Xsrc/opt_utils.c
  552. Xsrc/options.c
  553. Xsrc/out_utils.c
  554. Xsrc/pattern.c
  555. Xsrc/pmalloc.c
  556. Xsrc/quit.c
  557. Xsrc/read_rc.c
  558. Xsrc/remail.c
  559. Xsrc/reply.c
  560. Xsrc/returnadd.c
  561. Xsrc/save_opts.c
  562. Xsrc/savecopy.c
  563. Xsrc/screen.c
  564. Xsrc/showmsg.c
  565. Xsrc/showmsg_c.c
  566. Xsrc/signals.c
  567. Xsrc/softkeys.c
  568. Xsrc/sort.c
  569. Xsrc/string2.c
  570. Xsrc/strings.c
  571. Xsrc/syscall.c
  572. Xsrc/utils.c
  573. Xsrc/validname.c
  574. Xtest/test.empty
  575. Xtest/test.mail
  576. Xutils/Makefile.SH
  577. Xutils/answer.c
  578. Xutils/arepdaem.c
  579. Xutils/autoreply.c
  580. Xutils/checkalias
  581. Xutils/expand.c
  582. Xutils/fastmail.c
  583. Xutils/from.c
  584. Xutils/listalias.c
  585. Xutils/mailrc.awk
  586. Xutils/messages
  587. Xutils/newalias.c
  588. Xutils/newmail.c
  589. Xutils/printmail
  590. Xutils/readmsg.c
  591. SHAR_EOF
  592. chmod 0444 MANIFEST || echo "restore of MANIFEST fails"
  593. echo "x - extracting Instruct (Text)"
  594. sed 's/^X//' << 'SHAR_EOF' > Instruct &&
  595. X                Instructions
  596. X                ------------
  597. X
  598. X                Last Update: $Date: 89/03/23 16:15:01 $
  599. X
  600. X
  601. X    This file contains instructions on how to create and install
  602. Xthe entire ELM mail system.  It should be read BEFORE any attempts
  603. Xare made at actually creating and/or installing any of the software
  604. Xcontained herein!
  605. X
  606. X    There is actually really one step needed - unpack all the shar
  607. Xfiles and then;
  608. X
  609. X    $ cd <where-ever you're keeping the Elm sources>
  610. X
  611. X    $ sh Configure
  612. X
  613. X    Answer the questions of that program,, then let it create the
  614. Xlocalized Makefiles and system definition files for you.  When it's
  615. Xdone you can double check the configuration (or customize it further)
  616. Xby reading the Configuration Guide and then rerunning Configure.
  617. XThere are lots of neat features that are unique to this mailer - it's
  618. Xworth a quick perusal at least!
  619. X
  620. X    Once you're happy with the localized files, you then need to
  621. Xcreate the documentation (so there's a bit of a catch-22 that you need
  622. Xto format the Configuration guide before you are happy with the
  623. Xlocalization but can't do that until you're happy with the
  624. Xlocalization...oh well).
  625. X
  626. X    $
  627. X
  628. X    $ make documentation
  629. X
  630. X    When that's done, or even if it fails (don't worry too much about
  631. Xit), do the following:
  632. X
  633. X    $ make all > MAKELOG 2>&1 &
  634. X    $ tail -f MAKELOG
  635. X
  636. X    (if you're in "csh", substitute: "make all >& MAKELOG &")
  637. X
  638. XThis will take a fair while, so it's recommended that you go and eat 
  639. Xlunch or play a game for a while!! (alternatively, spend lots of money
  640. Xon a really FAST machine and blink your eyes a few times...)
  641. X
  642. XAssuming there are no errors during compilation (we'll have to assume
  643. Xthat for the moment) you should now be able to list the directory "bin"
  644. Xand find the following files:
  645. X
  646. X  answer        checkalias     filter         messages      printmail
  647. X  arepdaemon    elm            frm            newalias      readmsg
  648. X  autoreply     fastmail       listalais      newmail
  649. X
  650. Xnext, you can install all the software on your system by;
  651. X
  652. X    $ make install
  653. X    
  654. XNote: the mailer runs as setgid mail to have the ability to WRITE
  655. Xto the mail directory (for lock files).   If you have a different
  656. Xscheme at your site, feel free to set it up to use that instead.
  657. X
  658. XFinally, we're just about done!   The final checks can be made
  659. Xby the following commands:
  660. X
  661. X    $ elm -z
  662. X
  663. Xshould say "no mail" if nothing's in your incoming mailbox or should
  664. Xstart up the Elm program if there is, and
  665. X
  666. X    $ elm -f test/test.mail
  667. X
  668. Xshould read in EIGHT messages from various people.  While here, try to
  669. XA)lias C)urrent message for each of the eight messages to confirm that
  670. Xthe reply/address system is working okay.  Now Q)uit without having 
  671. Xmarked anything for deletion...answer the questions accordingly.
  672. X
  673. XIf you get this far you're in wonderful shape!  In fact, you're done!
  674. X
  675. XCongratulations!  You've just installed one of the best electronic mail
  676. Xsystems available today on your machine (if I say so myself!)
  677. X
  678. XHANDY HINTS:  If you want to create a print of the entire set of
  679. Xsources, including this file, use the command:
  680. X
  681. X    $ make listing
  682. X
  683. XIf, on the other hand, you just want to create a listing file of 
  684. Xjust the Elm sources, try:
  685. X
  686. X    $ make elm-listing
  687. X
  688. XAlso, if you have a number of machines on a network, you can rlogin
  689. Xto the remote machine and then do a remote install (after checking
  690. Xto ensure that the networking copy method in the Makefile under the
  691. Xtarget "remote-install" is correct) by typing:
  692. X
  693. X    $ make -f <remote Makefile> REMOTE=<remote file system> rmt-install
  694. X
  695. X(for example, if we had installed the system on machine "machx" and 
  696. X wanted to install it on "machy", with the Makefile in /src/Elm on
  697. X "machx", we could type from "machy";
  698. X     $ make -f machx:/src/Elm/Makefile REMOTE=machx: rmt-install
  699. X to have it install the system on machine y!)
  700. X
  701. XThat's it!
  702. X----------
  703. X
  704. X    Author's address:    taylor@hplabs.HP.COM
  705. X                hplabs!taylor
  706. X
  707. X  This document and the entire mail system is
  708. X
  709. X    (C) Copyright 1986, 1987 by Dave Taylor
  710. X    (C) Copyright 1988, 1989 by the Usenet Community Trust
  711. X
  712. XElm is now in the public trust.  Bug reports, comments, suggestions,
  713. Xetc. should be sent to:
  714. X
  715. X    Elm group's address:    elm@dsinc.UUCP
  716. X                dsinc!elm
  717. X
  718. X    Mail address:        Syd Weinstein
  719. X                Datacomp Systems, Inc.
  720. X                3837 Byron Road
  721. X                Huntingdon Valley, PA 19006-2320
  722. SHAR_EOF
  723. chmod 0444 Instruct || echo "restore of Instruct fails"
  724. echo "x - extracting Changes (Text)"
  725. sed 's/^X//' << 'SHAR_EOF' > Changes &&
  726. XThis file describes changes made to the Elm source distribution, and at
  727. Xleast some attempt to justify those changes.  Please remember that Elm
  728. Xis a volunteer project, we did what we had time for, and perhaps, what
  729. Xinterested us.  If you have a suggestion, or a fix, submit it, and better
  730. Xyet, volunteer to impliment it.
  731. X
  732. X        Syd Weinstein        Thu Mar 30 16:10:23 EST 1989
  733. X
  734. X
  735. X************************************************************************
  736. X*       The 2.2 release is the result of many man-years of work by the
  737. X    Elm Development and Testing Groups.  The changes are too many
  738. X    to mention in their entirity, as I doubt I could even track
  739. X    them all.  However this file will attempt to highlight some of
  740. X    them.
  741. X
  742. X*       Many of the changes are internal and not visible.  These help
  743. X    to make Elm more robust and more maintainable.  We still have a
  744. X    long way to go in this direction, but Elm 2.2 is a step in the
  745. X    right direction.
  746. X
  747. X*       This is not a patch to 2.1, but a complete new release.  Some
  748. X    file names have changed, so do NOT put this release in the same
  749. X    directory as the old one.
  750. X
  751. X*       The first change is a complete rewrite of the Configuration
  752. X    system.  We are now using Larry Walls metaconfigure package
  753. X    from his Dist V2.0 utilities.  This should make configuration
  754. X    much easier, but also currently makes the configuration
  755. X    questions appear is a non optimum order.
  756. X
  757. X*       The documentation has been rewritten from the mm macro set,
  758. X    which is distributed only with USG type systems, to a
  759. X    modification of the news macro set which is being distributed
  760. X    with Elm.
  761. X
  762. X*       The interface to the internal and external pagers have been
  763. X    rewritten to reduce problems.  The internal pager is still very
  764. X    dumb.
  765. X
  766. X*       All system messages have been worked on to make them more
  767. X    consistent.
  768. X
  769. X*    Numerious new elmrc options have been added.
  770. X
  771. X*       The system wide alias file has been moved from the spool
  772. X    directory to the library directory.
  773. X
  774. X*       Elm has been made more compatible with Mailx and Mush for sites
  775. X    that mix their usage.  To this end a Quick quit command has
  776. X    been added as have Status headers.
  777. X
  778. X*    The batch send mode and the send only mode within Elm has
  779. X    been changed to make it more consistent with the normal mode.
  780. X
  781. X*       Much work has been done to make Elm's curses more compatible
  782. X    with more terminal types.  However this is an interim
  783. X    solution.  Long term plans are to scrap the internal curses and
  784. X    use the system curses.
  785. X
  786. X*    The meaning of the space bar has been changed to allow one to
  787. X    page through their entire mailbox using the space bar.
  788. X
  789. X*    A copy command has been added, like the save command, but does
  790. X    not mark the message for deletion.
  791. X
  792. X*    All headers are now saved to the mail archive file.
  793. X
  794. X*    The alias menu now has the ability to list and delete aliases.
  795. SHAR_EOF
  796. chmod 0444 Changes || echo "restore of Changes fails"
  797. echo "x - extracting Configure (Text)"
  798. sed 's/^X//' << 'SHAR_EOF' > Configure &&
  799. X#! /bin/sh
  800. X#
  801. X# If these # comments don't work, trim them.  Don't worry about any other
  802. X# shell scripts, Configure will trim # comments from them for you.
  803. X#
  804. X# (If you are trying to port this package to a machine without sh, I would
  805. X# suggest you cut out the prototypical config.h from the end of Configure
  806. X# and edit it to reflect your system.  Some packages may include samples
  807. X# of config.h for certain machines, so you might look for one of those.)
  808. X#
  809. X# $Header: /files/home/users/syd/elm/RCS/Configure,v 2.37 89/03/29 09:19:46 syd Exp $
  810. X#
  811. X# Yes, you may rip this off to use in other distribution packages.
  812. X# (Note: this Configure script was generated automatically.  Rather than
  813. X# working with this copy of Configure, you may wish to get metaconfig.)
  814. X
  815. X: sanity checks
  816. XPATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin'
  817. Xexport PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  818. X
  819. Xif test ! -t 0; then
  820. X    echo "Say 'sh Configure', not 'sh <Configure'"
  821. X    exit 1
  822. Xfi
  823. X
  824. X(alias) >/dev/null 2>&1 && \
  825. X    echo "(I see you are using the Korn shell.  Some ksh's blow up on Configure," && \
  826. X    echo "especially on exotic machines.  If yours does, try the Bourne shell instead.)"
  827. X
  828. Xif test ! -d ../UU; then
  829. X    if test ! -d UU; then
  830. X    mkdir UU
  831. X    fi
  832. X    cd UU
  833. Xfi
  834. X
  835. Xcase "$1" in
  836. X-d) shift; fastread='yes';;
  837. Xesac
  838. X
  839. Xd_eunice=''
  840. Xeunicefix=''
  841. XLog=''
  842. XHeader=''
  843. Xcontains=''
  844. Xcppstdin=''
  845. Xcppminus=''
  846. Xd_index=''
  847. Xd_mkdir=''
  848. Xd_portable=''
  849. Xd_symlink=''
  850. Xd_vfork=''
  851. Xd_voidsig=''
  852. Xd_whoami=''
  853. Xn=''
  854. Xc=''
  855. Xpackage=''
  856. Xspitshell=''
  857. Xshsharp=''
  858. Xsharpbang=''
  859. Xstartsh=''
  860. Xdefine=''
  861. Xloclist=''
  862. Xexpr=''
  863. Xsed=''
  864. Xecho=''
  865. Xcat=''
  866. Xrm=''
  867. Xmv=''
  868. Xcp=''
  869. Xtail=''
  870. Xtr=''
  871. Xmkdir=''
  872. Xsort=''
  873. Xuniq=''
  874. Xgrep=''
  875. Xtrylist=''
  876. Xtest=''
  877. Xinews=''
  878. Xegrep=''
  879. Xmore=''
  880. Xpg=''
  881. XMcc=''
  882. Xvi=''
  883. Xmailx=''
  884. Xmail=''
  885. Xcpp=''
  886. Xperl=''
  887. Xemacs=''
  888. Xls=''
  889. Xrmail=''
  890. Xsendmail=''
  891. Xshar=''
  892. Xsmail=''
  893. Xtbl=''
  894. Xtroff=''
  895. Xnroff=''
  896. Xuname=''
  897. Xuuname=''
  898. Xline=''
  899. Xchgrp=''
  900. Xchmod=''
  901. Xlint=''
  902. Xsleep=''
  903. Xpr=''
  904. Xtar=''
  905. Xln=''
  906. Xlpr=''
  907. Xlp=''
  908. Xtouch=''
  909. Xmake=''
  910. Xbin=''
  911. Xd_calendar=''
  912. Xcalendar=''
  913. Xd_crypt=''
  914. Xcryptlib=''
  915. Xd_cuserid=''
  916. Xd_flock=''
  917. Xd_gethname=''
  918. Xd_douname=''
  919. Xd_phostname=''
  920. Xd_host_comp=''
  921. Xd_getopt=''
  922. Xd_havedbm=''
  923. Xdbm=''
  924. Xd_havetlib=''
  925. Xtermlib=''
  926. Xd_internet=''
  927. Xd_mboxedit=''
  928. Xd_newauto=''
  929. Xd_optreturn=''
  930. Xd_pafirst=''
  931. Xd_useuuname=''
  932. Xd_notouchadd=''
  933. Xd_noaddfrom=''
  934. Xd_usedomain=''
  935. Xd_nocheckvalid=''
  936. Xd_remlock=''
  937. Xmaxattempts=''
  938. Xd_rename=''
  939. Xd_setgid=''
  940. Xmailermode=''
  941. Xd_strings=''
  942. Xd_pwdinsys=''
  943. Xincludepath=''
  944. Xd_tempnam=''
  945. Xtempnamo=''
  946. Xtempnamc=''
  947. Xd_termio=''
  948. Xd_tminsys=''
  949. Xd_tz_min=''
  950. Xd_useembed=''
  951. Xd_utimbuf=''
  952. Xdefbatsub=''
  953. Xdefeditor=''
  954. Xelmalias=''
  955. Xmaxsysalias=''
  956. Xmaxuseralias=''
  957. Xhostname=''
  958. Xphostname=''
  959. Xmydomain=''
  960. Xlib=''
  961. Xlibc=''
  962. Xlinepr=''
  963. Xmaildir=''
  964. Xmailer=''
  965. Xmailgrp=''
  966. Xmansrc=''
  967. Xmanext=''
  968. Xmodels=''
  969. Xsplit=''
  970. Xsmall=''
  971. Xmedium=''
  972. Xlarge=''
  973. Xhuge=''
  974. Xoptimize=''
  975. Xccflags=''
  976. Xldflags=''
  977. Xcc=''
  978. Xlibs=''
  979. Xnametype=''
  980. Xd_passnames=''
  981. Xd_berknames=''
  982. Xd_usgnames=''
  983. Xpasscat=''
  984. Xpager=''
  985. Xpathalias=''
  986. Xdomains=''
  987. Xlsysfile=''
  988. Xlsysvssys=''
  989. Xprefshell=''
  990. Xrmttape=''
  991. Xroff=''
  992. Xtmpdir=''
  993. Xxencf=''
  994. Xxenlf=''
  995. Xd_xenix=''
  996. Xd_bsd=''
  997. XCONFIG=''
  998. X: set package name
  999. Xpackage=elm2
  1000. X
  1001. Xecho " "
  1002. Xecho "Beginning of configuration questions for $package kit."
  1003. X: Eunice requires " " instead of "", can you believe it
  1004. Xecho " "
  1005. X
  1006. Xdefine='define'
  1007. Xundef='undef'
  1008. Xlibpth='/usr/lib /usr/local/lib /usr/lib/386 /usr/lib/large /lib /lib/386 /lib/large'
  1009. Xsmallmach='pdp11 i8086 z8000 i80286 iAPX286'
  1010. Xrmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
  1011. Xtrap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
  1012. X
  1013. X: We must find out about Eunice early
  1014. Xeunicefix=':'
  1015. Xif test -f /etc/unixtovms; then
  1016. X    eunicefix=/etc/unixtovms
  1017. Xfi
  1018. Xif test -f /etc/unixtovms.exe; then
  1019. X    eunicefix=/etc/unixtovms.exe
  1020. Xfi
  1021. X
  1022. X: Now test for existence of everything in MANIFEST
  1023. X
  1024. Xecho "First let's make sure your kit is complete.  Checking..."
  1025. X(cd ..; cat `awk 'NR>4{print $1}' MANIFEST` >/dev/null || kill $$)
  1026. Xecho " "
  1027. X
  1028. Xattrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
  1029. Xattrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
  1030. Xattrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
  1031. Xattrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
  1032. Xattrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
  1033. Xattrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
  1034. Xd_newshome="/usr/NeWS"
  1035. Xdefvoidused=7
  1036. Xpth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb"
  1037. X
  1038. X: check for out bin directory
  1039. Xif test ! -d ../bin; then
  1040. X    echo "Making bin directory"
  1041. X    mkdir ../bin
  1042. Xelse
  1043. X    echo "Found bin directory"
  1044. Xfi
  1045. X
  1046. X: some greps do not return status, grrr.
  1047. Xecho "grimblepritz" >grimble
  1048. Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
  1049. X    contains=contains
  1050. Xelif grep grimblepritz grimble >/dev/null 2>&1 ; then
  1051. X    contains=grep
  1052. Xelse
  1053. X    contains=contains
  1054. Xfi
  1055. Xrm -f grimble
  1056. X: the following should work in any shell
  1057. Xcase "$contains" in
  1058. Xcontains*)
  1059. X    echo " "
  1060. X    echo "AGH!  Grep doesn't return a status.  Attempting remedial action."
  1061. X    cat >contains <<'EOSS'
  1062. Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
  1063. XEOSS
  1064. Xchmod +x contains
  1065. Xesac
  1066. X
  1067. X: first determine how to suppress newline on echo command
  1068. Xecho "Checking echo to see how to suppress newlines..."
  1069. X(echo "hi there\c" ; echo " ") >.echotmp
  1070. Xif $contains c .echotmp >/dev/null 2>&1 ; then
  1071. X    echo "...using -n."
  1072. X    n='-n'
  1073. X    c=''
  1074. Xelse
  1075. X    cat <<'EOM'
  1076. X...using \c
  1077. XEOM
  1078. X    n=''
  1079. X    c='\c'
  1080. Xfi
  1081. Xecho $n "Type carriage return to continue.  Your cursor should be here-->$c"
  1082. Xread ans
  1083. Xrm -f .echotmp
  1084. X
  1085. X: now set up to do reads with possible shell escape and default assignment
  1086. Xcat <<EOSC >myread
  1087. Xcase "\$fastread" in
  1088. Xyes) ans=''; echo " " ;;
  1089. X*) ans='!';;
  1090. Xesac
  1091. Xwhile expr "X\$ans" : "X!" >/dev/null; do
  1092. X    read ans
  1093. X    case "\$ans" in
  1094. X    !)
  1095. X    sh
  1096. X    echo " "
  1097. X    echo $n "\$rp $c"
  1098. X    ;;
  1099. X    !*)
  1100. X    set \`expr "X\$ans" : "X!\(.*\)\$"\`
  1101. X    sh -c "\$*"
  1102. X    echo " "
  1103. X    echo $n "\$rp $c"
  1104. X    ;;
  1105. X    esac
  1106. Xdone
  1107. Xrp='Your answer:'
  1108. Xcase "\$ans" in
  1109. X'') ans="\$dflt";;
  1110. Xesac
  1111. XEOSC
  1112. X
  1113. X: general instructions
  1114. Xcat <<EOH
  1115. XThis installation shell script will examine your system and ask you questions
  1116. Xto determine how the $package package should be installed.  If you get stuck
  1117. Xon a question, you may use a ! shell escape to start a subshell or execute
  1118. Xa command.  Many of the questions will have default answers in square
  1119. Xbrackets--typing carriage return will give you the default.
  1120. X
  1121. XOn some of the questions which ask for file or directory names you are
  1122. Xallowed to use the ~name construct to specify the login directory belonging
  1123. Xto "name", even if you don't have a shell which knows about that.  Questions
  1124. Xwhere this is allowed will be marked "(~name ok)".
  1125. X
  1126. XEOH
  1127. Xrp="[Type carriage return to continue]"
  1128. Xecho $n "$rp $c"
  1129. X. myread
  1130. Xcat <<EOH
  1131. X
  1132. XMuch effort has been expended to ensure that this shell script will run
  1133. Xon any Unix system.  If despite that it blows up on you, your best bet is
  1134. Xto edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
  1135. Xknow how I blew it.  If you can't run Configure for some reason, you'll have
  1136. Xto generate a config.sh file by hand.
  1137. X
  1138. XThis installation script affects things in two ways: 1) it may do direct
  1139. Xvariable substitutions on some of the files included in this kit, and
  1140. X2) it builds a config.h file for inclusion in C programs.  You may edit
  1141. Xany of these files as the need arises after running this script.
  1142. X
  1143. XIf you make a mistake on a question, there is no easy way to back up to it
  1144. Xcurrently.  The easiest thing to do is to edit config.sh and rerun all the
  1145. XSH files.  Configure will offer to let you do this before it runs the SH files.
  1146. X
  1147. XEOH
  1148. Xrp="[Type carriage return to continue]"
  1149. Xecho $n "$rp $c"
  1150. X. myread
  1151. X
  1152. X: get old answers, if there is a config file out there
  1153. Xif test -f ../config.sh; then
  1154. X    echo " "
  1155. X    dflt=y
  1156. X    rp="I see a config.sh file.  Did Configure make it on THIS system? [$dflt]"
  1157. X    echo $n "$rp $c"
  1158. X    . myread
  1159. X    case "$ans" in
  1160. X    n*) echo "OK, I'll ignore it.";;
  1161. X    *)  echo "Fetching default answers from your old config.sh file..."
  1162. X    tmp="$n"
  1163. X    ans="$c"
  1164. X        . ../config.sh
  1165. X    n="$tmp"
  1166. X    c="$ans"
  1167. X    ;;
  1168. X    esac
  1169. Xfi
  1170. X
  1171. X: find out where common programs are
  1172. Xecho " "
  1173. Xecho "Locating common programs..."
  1174. Xcat <<EOSC >loc
  1175. X$startsh
  1176. Xcase \$# in
  1177. X0) exit 1;;
  1178. Xesac
  1179. Xthing=\$1
  1180. Xshift
  1181. Xdflt=\$1
  1182. Xshift
  1183. Xfor dir in \$*; do
  1184. X    case "\$thing" in
  1185. X    .)
  1186. X    if test -d \$dir/\$thing; then
  1187. X        echo \$dir
  1188. X        exit 0
  1189. X    fi
  1190. X    ;;
  1191. X    *)
  1192. X    if test -f \$dir/\$thing; then
  1193. X        echo \$dir/\$thing
  1194. X        exit 0
  1195. X    elif test -f \$dir/\$thing.exe; then
  1196. X        : on Eunice apparently
  1197. X        echo \$dir/\$thing
  1198. X        exit 0
  1199. X    fi
  1200. X    ;;
  1201. X    esac
  1202. Xdone
  1203. Xecho \$dflt
  1204. Xexit 1
  1205. XEOSC
  1206. Xchmod +x loc
  1207. X$eunicefix loc
  1208. Xloclist="
  1209. Xcat
  1210. Xchgrp
  1211. Xchmod
  1212. Xcp
  1213. Xecho
  1214. Xexpr
  1215. Xgrep
  1216. Xln
  1217. Xls
  1218. Xmake
  1219. Xmv
  1220. Xrm
  1221. Xsed
  1222. Xsleep
  1223. Xtouch
  1224. Xtr
  1225. X"
  1226. Xtrylist="
  1227. XMcc
  1228. Xcpp
  1229. Xemacs
  1230. Xline
  1231. Xlint
  1232. Xlp
  1233. Xlpr
  1234. Xmailx
  1235. Xmore
  1236. Xnroff
  1237. Xpg
  1238. Xpr
  1239. Xrmail
  1240. Xsendmail
  1241. Xshar
  1242. Xsmail
  1243. Xtar
  1244. Xtbl
  1245. Xtest
  1246. Xtroff
  1247. Xuname
  1248. Xuuname
  1249. Xvi
  1250. X"
  1251. Xfor file in $loclist; do
  1252. X    xxx=`loc $file $file $pth`
  1253. X    eval $file=$xxx
  1254. X    eval _$file=$xxx
  1255. X    case "$xxx" in
  1256. X    /*)
  1257. X    echo $file is in $xxx.
  1258. X    ;;
  1259. X    *)
  1260. X    echo "I don't know where $file is.  I hope it's in everyone's PATH."
  1261. X    ;;
  1262. X    esac
  1263. Xdone
  1264. Xecho " "
  1265. Xecho "Don't worry if any of the following aren't found..."
  1266. Xans=offhand
  1267. Xfor file in $trylist; do
  1268. X    xxx=`loc $file $file $pth`
  1269. X    eval $file=$xxx
  1270. X    eval _$file=$xxx
  1271. X    case "$xxx" in
  1272. X    /*)
  1273. X    echo $file is in $xxx.
  1274. X    ;;
  1275. X    *)
  1276. X    echo "I don't see $file out there, $ans."
  1277. X    ans=either
  1278. X    ;;
  1279. X    esac
  1280. Xdone
  1281. Xcase "$egrep" in
  1282. Xegrep)
  1283. X    echo "Substituting grep for egrep."
  1284. X    egrep=$grep
  1285. X    ;;
  1286. Xesac
  1287. Xcase "$test" in
  1288. Xtest)
  1289. X    echo "Hopefully test is built into your sh."
  1290. X    ;;
  1291. X/bin/test)
  1292. X    if sh -c "PATH= test true" >/dev/null 2>&1; then
  1293. X    echo "Using the test built into your sh."
  1294. X    test=test
  1295. X    fi
  1296. X    ;;
  1297. X*)
  1298. X    test=test
  1299. X    ;;
  1300. Xesac
  1301. Xcase "$echo" in
  1302. Xecho)
  1303. X    echo "Hopefully echo is built into your sh."
  1304. X    ;;
  1305. X/bin/echo)
  1306. X    echo " "
  1307. X    echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
  1308. X    $echo $n "hi there$c" >foo1
  1309. X    echo $n "hi there$c" >foo2
  1310. X    if cmp foo1 foo2 >/dev/null 2>&1; then
  1311. X    echo "They are compatible.  In fact, they may be identical."
  1312. X    else
  1313. X    case "$n" in
  1314. X    '-n') n='' c='\c' ans='\c' ;;
  1315. X    *) n='-n' c='' ans='-n' ;;
  1316. X    esac
  1317. X    cat <<FOO
  1318. XThey are not compatible!  You are probably running ksh on a non-USG system.
  1319. XI'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
  1320. Xhave echo built in and we may have to run some Bourne shell scripts.  That
  1321. Xmeans I'll have to use $ans to suppress newlines now.  Life is ridiculous.
  1322. X
  1323. XFOO
  1324. X    rp="Your cursor should be here-->"
  1325. X    $echo $n "$rp$c"
  1326. X    . myread
  1327. X    fi
  1328. X    $rm -f foo1 foo2
  1329. X    ;;
  1330. X*)
  1331. X    : cross your fingers
  1332. X    echo=echo
  1333. X    ;;
  1334. Xesac
  1335. Xrmlist="$rmlist loc"
  1336. X
  1337. X: get list of predefined functions in a handy place
  1338. Xif $test -n "$uname"; then
  1339. X    os=`$uname -s`
  1340. Xelse
  1341. X    os=unknown
  1342. Xfi
  1343. Xecho " "
  1344. Xif test -f /lib/libc.a; then
  1345. X    echo "Your C library is in /lib/libc.a.  You're normal."
  1346. X    libc=/lib/libc.a
  1347. Xelse
  1348. X    if test "$os" = DomainOS ; then
  1349. X    ans=`loc libc blurfl/dyick $libpth`
  1350. X    else
  1351. X    ans=`loc libc.a blurfl/dyick $libpth`
  1352. X    fi
  1353. X    if test ! -f "$ans"; then
  1354. X    ans=`loc clib blurfl/dyick $libpth`
  1355. X    fi
  1356. X    if test ! -f "$ans"; then
  1357. X    ans=`loc libc blurfl/dyick $libpth`
  1358. X    fi
  1359. X    if test ! -f "$ans"; then
  1360. X    ans=`loc Slibc.a blurfl/dyick /usr/lib/386 /lib/386 $libpth`
  1361. X    fi
  1362. X    if test ! -f "$ans"; then
  1363. X    ans=`loc Mlibc.a blurfl/dyick $libpth`
  1364. X    fi
  1365. X    if test ! -f "$ans"; then
  1366. X    ans=`loc Llibc.a blurfl/dyick $libpth`
  1367. X    fi
  1368. X    if test -f "$ans"; then
  1369. X    echo "Your C library is in $ans, of all places."
  1370. X    libc=$ans
  1371. X    else
  1372. X    if test -f "$libc"; then
  1373. X        echo "Your C library is in $libc, like you said before."
  1374. X    else
  1375. X        cat <<EOM
  1376. XI can't seem to find your C library.  I've looked in the following places:
  1377. X
  1378. X    $libpth
  1379. X
  1380. XNone of these seems to contain your C library.  What is the full name
  1381. XEOM
  1382. X        dflt=None
  1383. X        $echo $n "of your C library? $c"
  1384. X        rp='C library full name?'
  1385. X        . myread
  1386. X        libc="$ans"
  1387. X    fi
  1388. X    fi
  1389. Xfi
  1390. Xecho " "
  1391. X$echo $n "Extracting names from $libc for later perusal...$c"
  1392. Xnm $libc 2>/dev/null >libc.tmp
  1393. X$sed -n -e 's/^.* [AT] _//p' -e 's/^.* [AT] //p' <libc.tmp >libc.list
  1394. Xif $contains '^printf$' libc.list >/dev/null 2>&1; then
  1395. X    echo "done"
  1396. Xelse
  1397. X    if test "$os" = DomainOS ; then
  1398. X        $sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
  1399. X    else
  1400. X    $sed -n -e 's/^.* D _//p' -e 's/^.* D //p' <libc.tmp >libc.list
  1401. X    fi
  1402. X    $contains '^printf$' libc.list >/dev/null 2>&1 || \
  1403. X       $sed -n -e 's/^_//' \
  1404. X          -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
  1405. X    if $contains '^printf$' libc.list >/dev/null 2>&1; then
  1406. X    echo "done"
  1407. X    else
  1408. X    echo " "
  1409. X    echo "nm didn't seem to work right."
  1410. X    echo "Trying ar instead..."
  1411. X    if ar t $libc > libc.tmp; then
  1412. X        $sed -e 's/\.o$//' < libc.tmp > libc.list
  1413. X        echo "Ok."
  1414. X    else
  1415. X        echo "ar didn't seem to work right."
  1416. X        echo "Maybe this is a Cray...trying bld instead..."
  1417. X        if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
  1418. X        echo "Ok."
  1419. X        else
  1420. X            echo "That didn't work either.  Giving up."
  1421. X            exit 1
  1422. X        fi
  1423. X    fi
  1424. X    fi
  1425. Xfi
  1426. Xrmlist="$rmlist libc.tmp libc.list"
  1427. X
  1428. X: make some quick guesses about what we are up against
  1429. Xecho " "
  1430. X$echo $n "Hmm...  $c"
  1431. Xif $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then
  1432. X    echo "Looks kind of like a BSD system, but we'll see..."
  1433. X    echo exit 0 >bsd
  1434. X    echo exit 1 >usg
  1435. X    echo exit 1 >v7
  1436. Xelif $contains '^fcntl$' libc.list >/dev/null 2>&1 ; then
  1437. X    echo "Looks kind of like a USG system, but we'll see..."
  1438. X    echo exit 1 >bsd
  1439. X    echo exit 0 >usg
  1440. X    echo exit 1 >v7
  1441. Xelse
  1442. X    echo "Looks kind of like a version 7 system, but we'll see..."
  1443. X    echo exit 1 >bsd
  1444. X    echo exit 1 >usg
  1445. X    echo exit 0 >v7
  1446. Xfi
  1447. Xif $contains '^vmssystem$' libc.list >/dev/null 2>&1 ; then
  1448. X    cat <<'EOI'
  1449. XThere is, however, a strange, musty smell in the air that reminds me of
  1450. Xsomething...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
  1451. XEOI
  1452. X    echo "exit 0" >eunice
  1453. X    eunicefix=unixtovms
  1454. X    d_eunice="$define"
  1455. X: it so happens the Eunice I know will not run shell scripts in Unix format
  1456. Xelse
  1457. X    echo " "
  1458. X    echo "Congratulations.  You aren't running Eunice."
  1459. X    eunicefix=':'
  1460. X    d_eunice="$undef"
  1461. X    echo "exit 1" >eunice
  1462. Xfi
  1463. Xif test -f /xenix; then
  1464. X    echo "Actually, this looks more like a XENIX system..."
  1465. X    echo "exit 0" >xenix
  1466. Xelse
  1467. X    echo " "
  1468. X    echo "It's not Xenix..."
  1469. X    echo "exit 1" >xenix
  1470. Xfi
  1471. Xchmod +x xenix
  1472. X$eunicefix xenix
  1473. Xif test -f /venix; then
  1474. X    echo "Actually, this looks more like a VENIX system..."
  1475. X    echo "exit 0" >venix
  1476. Xelse
  1477. X    echo " "
  1478. X    if xenix; then
  1479. X    : null
  1480. X    else
  1481. X    echo "Nor is it Venix..."
  1482. X    fi
  1483. X    echo "exit 1" >venix
  1484. Xfi
  1485. Xchmod +x bsd usg v7 eunice venix
  1486. X$eunicefix bsd usg v7 eunice venix
  1487. Xrmlist="$rmlist bsd usg v7 eunice venix xenix"
  1488. X
  1489. X: see if sh knows # comments
  1490. Xecho " "
  1491. Xecho "Checking your sh to see if it knows about # comments..."
  1492. Xif sh -c '#' >/dev/null 2>&1 ; then
  1493. X    echo "Your sh handles # comments correctly."
  1494. X    shsharp=true
  1495. X    spitshell=cat
  1496. X    echo " "
  1497. X    echo "Okay, let's see if #! works on this system..."
  1498. X    echo "#!/bin/echo hi" > try
  1499. X    $eunicefix try
  1500. X    chmod +x try
  1501. X    try > today
  1502. X    if $contains hi today >/dev/null 2>&1; then
  1503. X    echo "It does."
  1504. X    sharpbang='#!'
  1505. X    else
  1506. X    echo "#! /bin/echo hi" > try
  1507. X    $eunicefix try
  1508. X    chmod +x try
  1509. X    try > today
  1510. X    if test -s today; then
  1511. X        echo "It does."
  1512. X        sharpbang='#! '
  1513. X    else
  1514. X        echo "It doesn't."
  1515. X        sharpbang=': use '
  1516. X    fi
  1517. X    fi
  1518. Xelse
  1519. X    echo "Your sh doesn't grok # comments--I will strip them later on."
  1520. X    shsharp=false
  1521. X    echo "exec grep -v '^#'" >spitshell
  1522. X    chmod +x spitshell
  1523. X    $eunicefix spitshell
  1524. X    spitshell=`pwd`/spitshell
  1525. X    echo "I presume that if # doesn't work, #! won't work either!"
  1526. X    sharpbang=': use '
  1527. Xfi
  1528. X
  1529. X: figure out how to guarantee sh startup
  1530. Xecho " "
  1531. Xecho "Checking out how to guarantee sh startup..."
  1532. Xstartsh=$sharpbang'/bin/sh'
  1533. Xecho "Let's see if '$startsh' works..."
  1534. Xcat >try <<EOSS
  1535. X$startsh
  1536. Xset abc
  1537. Xtest "$?abc" != 1
  1538. XEOSS
  1539. X
  1540. Xchmod +x try
  1541. X$eunicefix try
  1542. Xif try; then
  1543. X    echo "Yup, it does."
  1544. Xelse
  1545. X    echo "Nope.  You may have to fix up the shell scripts to make sure sh runs them."
  1546. Xfi
  1547. Xrm -f try today
  1548. X
  1549. X: get calendar mode and default calendar file name
  1550. X$cat <<EOM
  1551. X
  1552. XThere is a neat feature that enables scanning of the message body for
  1553. Xentries to add to the users ".calendar" (or whatever) file.  These
  1554. Xentries are then processed by the system program calendar.  To use
  1555. Xthis feature it needs to be enabled.  The name of the per user calendar
  1556. Xfile used by your systems calendar program is also required.
  1557. XEOM
  1558. X
  1559. Xcase "$d_calendar" in
  1560. X"$define") dflt=y;;
  1561. X"$undef")  dflt=n;;
  1562. X*)       dflt=y;;
  1563. Xesac
  1564. X
  1565. Xrp="Enable calendar feature [$dflt]"
  1566. X$echo $n "$rp $c"
  1567. X. myread
  1568. Xcase "$ans" in
  1569. Xy*) d_calendar="$define";;
  1570. X*)  d_calendar="$undef";;
  1571. Xesac
  1572. X
  1573. Xcase "$calendar" in
  1574. X    '') dflt='calendar';;
  1575. X    *)  dflt=$calendar;;
  1576. Xesac
  1577. X
  1578. Xif $test "$d_calendar" = "$define"; then
  1579. X    echo " "
  1580. X    rp="Default calendar file: [$dflt]"
  1581. X    $echo $n "$rp $c"
  1582. X    . myread
  1583. X    calendar="$ans"
  1584. Xfi
  1585. X
  1586. X: find out how to find out full name
  1587. Xecho " "
  1588. Xcase "$d_berknames" in
  1589. X"$define")
  1590. X    dflt=y;;
  1591. X"$undef")
  1592. X    dflt=n;;
  1593. X*)
  1594. X    if bsd; then
  1595. X    dflt=y
  1596. X    elif xenix; then
  1597. X    dflt=y
  1598. X    else
  1599. X    dflt=n
  1600. X    fi
  1601. X    ;;
  1602. Xesac
  1603. Xecho "Does your /etc/passwd file keep full names in Berkeley/V7 format (name first"
  1604. X$echo $n "thing after ':' in GCOS field)? [$dflt] $c"
  1605. Xrp="Berkeley/V7 format full name? [$dflt]"
  1606. X. myread
  1607. Xcase "$ans" in
  1608. X  y*)
  1609. X    d_passnames="$define"
  1610. X    d_berknames="$define"
  1611. X    d_usgnames="$undef"
  1612. X    nametype=bsd
  1613. X    ;;
  1614. X  *)
  1615. X    echo " "
  1616. X    case "$d_usgnames" in
  1617. X    "$define")
  1618. X    dflt=y;;
  1619. X    "$undef")
  1620. X    dflt=n;;
  1621. X    *)
  1622. X    if usg; then
  1623. X        dflt=y
  1624. X    else
  1625. X        dflt=n
  1626. X    fi
  1627. X    ;;
  1628. X    esac
  1629. X    echo "Does your passwd file keep full names in USG format (name sandwiched"
  1630. X    $echo $n "between a '-' and a '(')? [$dflt] $c"
  1631. X    rp="USG format full name? [$dflt]"
  1632. X    . myread
  1633. X    case "$ans" in
  1634. X      n*)
  1635. X    echo "Full name will be taken from ~/.fullname"
  1636. X    d_passnames="$undef"
  1637. X    d_berknames="$undef"
  1638. X    d_usgnames="$undef"
  1639. X    nametype=other
  1640. X    ;;
  1641. X      *)
  1642. X    d_passnames="$define"
  1643. X    d_berknames="$undef"
  1644. X    d_usgnames="$define"
  1645. X    nametype=usg
  1646. X    ;;
  1647. X    esac
  1648. X    ;;
  1649. Xesac
  1650. X
  1651. X: see if we have to deal with yellow pages
  1652. Xif $test -d /usr/etc/yp; then
  1653. X    if $contains '^\+:' /etc/passwd; then
  1654. X    dflt=y
  1655. X    else
  1656. X    dflt=n
  1657. X    fi
  1658. X    rp="Are you getting the passwd file via yellow pages? [$dflt]"
  1659. X    $echo $n "$rp $c"
  1660. X    . myread
  1661. X    case "$ans" in
  1662. X    y*) passcat='ypcat passwd';;
  1663. X    *) passcat='cat /etc/passwd';;
  1664. X    esac
  1665. Xelse
  1666. X    passcat='cat /etc/passwd'
  1667. Xfi
  1668. X
  1669. X: default clear to no extra flags
  1670. Xxencf=
  1671. Xxenlf=
  1672. Xd_xenix="$undef"
  1673. Xd_bsd="$undef"
  1674. X: see if we are xenix 
  1675. Xif xenix; then
  1676. X    d_xenix="$define"
  1677. X:    now are we a 286
  1678. X    case "`uname -p`" in
  1679. X    i80286) 
  1680. X        xencf="-LARGE -Ml2et32"
  1681. X        xenlf="-Ml2t32 -F 5000 -SEG 512"
  1682. X      esac
  1683. Xfi
  1684. Xif bsd; then
  1685. X    d_bsd="$define"
  1686. Xfi
  1687. X
  1688. X: see if crypt exists
  1689. Xecho " "
  1690. Xif $contains '^crypt$' libc.list >/dev/null 2>&1; then
  1691. X    echo 'crypt() found.'
  1692. X    d_crypt="$define"
  1693. X    cryptlib=
  1694. Xelse
  1695. X    cryptlib=`loc Slibcrypt.a "" /lib/386 /lib`
  1696. X    if $test -z "$cryptlib"; then
  1697. X    cryptlib=`loc Mlibcrypt.a "" /lib/386 /lib`
  1698. X    else
  1699. X    cryptlib=-lcrypt
  1700. X    fi
  1701. X    if $test -z "$cryptlib"; then
  1702. X    cryptlib=`loc Llibcrypt.a "" /lib/386 /lib`
  1703. X    else
  1704. X    cryptlib=-lcrypt
  1705. X    fi
  1706. X    if $test -z "$cryptlib"; then
  1707. X    cryptlib=`loc libcrypt.a "" $libpth`
  1708. X    else
  1709. X    cryptlib=-lcrypt
  1710. X    fi
  1711. X    if $test -z "$cryptlib"; then
  1712. X    echo 'crypt() not found.'
  1713. X    d_crypt="$undef"
  1714. X    else
  1715. X    d_crypt="$define"
  1716. X    fi
  1717. Xfi
  1718. X
  1719. X: check for cuserid function
  1720. Xecho " "
  1721. Xif $contains '^cuserid$' libc.list >/dev/null 2>&1 ; then
  1722. X    echo "cuserid() found."
  1723. X    d_cuserid="$undef"
  1724. Xelse
  1725. X    echo "No cuserid() found--will use mine."
  1726. X    d_cuserid="$define"
  1727. Xfi
  1728. X
  1729. X: now get the host name
  1730. Xecho " "
  1731. Xecho "Figuring out host name..."
  1732. Xecho 'Maybe "hostname" will work...'
  1733. Xif ans=`sh -c hostname 2>&1` ; then
  1734. X    hostname=$ans
  1735. X    phostname=hostname
  1736. Xelse
  1737. X    if xenix; then
  1738. X    echo 'Oh, dear.  Maybe "/etc/systemid" is the key...'
  1739. X    if ans=`cat /etc/systemid 2>&1` ; then
  1740. X        hostname=$ans
  1741. X        phostname='cat /etc/systemid'
  1742. X        echo "Whadyaknow.  Xenix always was a bit strange..."
  1743. X    else
  1744. X        echo 'No, maybe "uuname -l" will work...'
  1745. X        if ans=`sh -c 'uuname -l' 2>&1` ; then
  1746. X        hostname=$ans
  1747. X        phostname='uuname -l'
  1748. X        else
  1749. X        echo 'Strange.  Maybe "uname -n" will work...'
  1750. X        if ans=`sh -c 'uname -n' 2>&1` ; then
  1751. X            hostname=$ans
  1752. X            phostname='uname -n'
  1753. X        else
  1754. X            echo 'Oh well, maybe I can mine it out of whoami.h...'
  1755. X            if ans=`sh -c $contains' sysname /usr/include/whoami.h' 2>&1` ; then
  1756. X            hostname=`echo "$ans" | $sed 's/^.*"\(.*\)"/\1/'`
  1757. X            phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' </usr/include/whoami.h"
  1758. X            else
  1759. X            case "$hostname" in
  1760. X            '') echo "Does this machine have an identity crisis or something?"
  1761. X                phostname=''
  1762. X                ;;
  1763. X            *)  echo "Well, you said $hostname before...";;
  1764. X            esac
  1765. X            fi
  1766. X        fi
  1767. X        fi
  1768. X    fi
  1769. X    else
  1770. X    if $test -r /etc/systemid ; then
  1771. X        echo "What is a non-Xenix system doing with /etc/systemid?"
  1772. X    fi
  1773. X    echo 'No, maybe "uuname -l" will work...'
  1774. X    if ans=`sh -c 'uuname -l' 2>&1` ; then
  1775. X        hostname=$ans
  1776. X        phostname='uuname -l'
  1777. X    else
  1778. X        echo 'Strange.  Maybe "uname -n" will work...'
  1779. X        if ans=`sh -c 'uname -n' 2>&1` ; then
  1780. X        hostname=$ans
  1781. X        phostname='uname -n'
  1782. X        else
  1783. X        if ans=`cat /etc/systemid 2>&1` ; then
  1784. X            hostname=$ans
  1785. X            phostname='cat /etc/systemid'
  1786. X            echo "Well, I'll use the systemid file anyway..."
  1787. X        else
  1788. X            echo 'Oh well, maybe I can mine it out of whoami.h...'
  1789. X            if ans=`sh -c $contains' sysname /usr/include/whoami.h' 2>&1` ; then
  1790. X            hostname=`echo "$ans" | $sed 's/^.*"\(.*\)"/\1/'`
  1791. X            phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' </usr/include/whoami.h"
  1792. X            else
  1793. X            case "$hostname" in
  1794. X            '') echo "Does this machine have an identity crisis or something?"
  1795. X                phostname=''
  1796. X                ;;
  1797. X            *)  echo "Well, you said $hostname before...";;
  1798. X            esac
  1799. X            fi
  1800. X        fi
  1801. X        fi
  1802. X    fi
  1803. X    fi
  1804. Xfi
  1805. X: you do not want to know about this
  1806. Xset $hostname
  1807. Xhostname=$1
  1808. X
  1809. X: translate upper to lower if necessary
  1810. Xcase "$hostname" in
  1811. X    *[A-Z]*)
  1812. X    hostname=`echo $hostname | tr '[A-Z]' '[a-z]'`
  1813. X    echo "(Normalizing case in your host name)"
  1814. X    ;;
  1815. Xesac
  1816. X
  1817. X: verify guess
  1818. Xif $test "$hostname" ; then
  1819. X    dflt=y
  1820. X    echo 'Your host name appears to be "'$hostname'".'
  1821. X    $echo $n "Is this correct? [$dflt] $c"
  1822. X    rp="Sitename is $hostname? [$dflt]"
  1823. X    . myread
  1824. X    case "$ans" in
  1825. X      y*)  ;;
  1826. X      *)      hostname='' ;;
  1827. X    esac
  1828. Xfi
  1829. X
  1830. X: bad guess or no guess
  1831. Xwhile $test "X$hostname" = X ; do
  1832. X    dflt=''
  1833. X    rp="Please type the (one word) name of your host:"
  1834. X    $echo $n "$rp $c"
  1835. X    . myread
  1836. X    hostname="$ans"
  1837. Xdone
  1838. X
  1839. Xecho " "
  1840. Xcase "$hostname" in
  1841. X*.*)
  1842. X    dflt=`$expr "X$hostname" : "X[^.]*\(\..*\)"`
  1843. X    hostname=`$expr "X$hostname" : "X\([^.]*\)\."`
  1844. X    echo "(Trimming domain name from host name--host name is now $hostname)"
  1845. X    ;;
  1846. X*)  case "$mydomain" in
  1847. X    '') dflt='.UUCP';;
  1848. X    *) dflt="$mydomain";;
  1849. X    esac
  1850. X    ;;
  1851. Xesac
  1852. Xrp="What is your domain name? [$dflt]"
  1853. X$echo $n "$rp $c"
  1854. X. myread
  1855. Xcase "$ans" in
  1856. X'') ;;
  1857. X.*) ;;
  1858. X*) ans=".$ans";;
  1859. Xesac
  1860. Xmydomain="$ans"
  1861. X
  1862. X: a little sanity check here
  1863. Xcase "$phostname" in
  1864. X'') ;;
  1865. X*)  case `$phostname` in
  1866. X    $hostname$mydomain|$hostname) ;;
  1867. X    *)
  1868. X    case "$phostname" in
  1869. X    sed*)
  1870. SHAR_EOF
  1871. echo "End of part 1"
  1872. echo "File Configure is continued in part 2"
  1873. echo "2" > s2_seq_.tmp
  1874. exit 0
  1875.  
  1876.